﻿using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace ContentSliderWebPart.VisualWebPart1
{
    [ToolboxItemAttribute(false)]
    public class JCarousel : WebPart
    {
        // Visual Studio might automatically update this path when you change the Visual Web Part project item.
        private const string _ascxPath = @"~/_CONTROLTEMPLATES/ContentSliderWebPart/Jcarousel/JCarouselWebPartUserControl.ascx";

        private string listname;

        [Personalizable(PersonalizationScope.Shared),
        WebBrowsable(true),
        WebDisplayName("List Name"),
        WebDescription("Name of the list that you want to pull pictures from"),
        Category("Advanced")]
        public string Listname
        {
            get { return listname; }
            set { listname = value; }
        }

        protected override void CreateChildControls()
        {
            Control control = Page.LoadControl(_ascxPath);
            Controls.Add(control);
        }
    }
}
